<?php
/*
Single Post Template: Post - Reference Project Print
*/
?>

<?php include 'single-reference-project-print-header.php' ; ?>
<?php include 'single-reference-project-calculations.php' ; ?>

<style>
	#rpprintleft h3 { display:block;width:100%;height:30px;line-height:30px;text-indent:10px;font-size:18px;font-weight:bold;color:#ffffff;background:#e77d1d;margin:0px; }
	#rpprintright h2, #rpprintleft h2 { display:block;width:100%;height:40px;line-height:40px;text-indent:10px;font-size:20px;font-weight:bold;color:#ffffff;background:#002d55;margin:0px;background-image: url('images/blue1pxbg.jpg') repeat; }
	.referenceprojectImage { width:204px;float:left;margin:0px;margin-right:20px; }
	.referenceprojectContent { width:436px;float:left;margin:0px; }
	#sidebar {  }
		#sidebar-container h3.referenceprojectH3 { display:block;width:100%;height:30px;line-height:30px;text-indent:10px;font-size:18px;font-weight:bold;color:#ffffff;background:#e77d1d;margin:0px; }
		.referenceprojectsidebarbox { width:278px;padding:10px;border:#e77d1d 1px solid;border-top:0px;margin-bottom:10px;background:#f2f2f2; }
			.referenceprojectsidebarbox h3.referenceprojectH3 { display:block;width:100%;height:30px;line-height:30px;text-indent:10px;font-size:18px;font-weight:bold;color:#ffffff;background:#e77d1d;margin:0px; }
			.referenceprojectsidebarbox ul { list-style:none;padding:0px;margin:0px; }
				.referenceprojectsidebarbox ul li { display:block;height:22px;line-height:22px;margin:0px;font-size:12px; }
					.referenceprojectsidebarbox ul li a, .referenceprojectsidebarbox ul li a:visited { color:#002d55;text-decoration:none; }
						.referenceprojectsidebarbox ul li a:hover { color:#e77d1d; }
			.referenceprojectsidebarbox textarea { width:97%; }
			.referenceprojectsidebarbox input[type=text] { height:26px;line-height:26px;text-indent:10px; }
			.referenceprojectsidebarbox input[type=submit] { display:block;width:100%;height:40px;line-height:38px;background:#002d55;color:#ffffff;text-align:center;font-size:15px;font-weight:bold; }
				.referenceprojectsidebarbox input[type=submit]:hover { background:#e77d1d; }
</style>

	<div id="container">
    
		<div id="rpprintleft" class="referenceproject-content">

<?php the_post() ?>

                <div style="width:660px;height:40px;margin:0px;margin-bottom:10px;">
                	<img src="/wp-content/themes/SunMaxxSolar/images/bluebar-titlebar.jpg" />
                </div>
				
                <div id="rpprintcontent">
                	<div class="refprojectmainimage">
						<?php the_post_thumbnail(); ?>
                    	<!--<img src="http://www.sunmaxxsolar.com/wp-content/uploads/2012/02/2011-03-29_14-10-48_2171-300x205.jpg" />-->
					</div> 
                	<p><?php if(function_exists('mpdf_pdfbutton')) mpdf_pdfbutton(); ?></p>
                	<span class="rpprinttitle"><?php meta('RPCustomer'); ?></span>
                	<?php the_content() ?>
                </div>
                
                <div style="width:660px;height:30px;margin-top:20px;">
                    <img src="/wp-content/themes/SunMaxxSolar/images/orangebar-buildingdetails.jpg" />
                </div>
                <table width="100%" cellpadding="0" cellspacing="0" border="0" style="border:#e77d1d 1px solid;clear:both;">
                	<tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Building Type</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPBuildingType'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Construction Year</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	<?php if ( get_post_meta($post->ID, 'RPBuildingConstructionYear', true) ) { ?>
								<?php meta('RPBuildingConstructionYear'); ?>
							<?php } else { ?>
								Unknown
							<?php } ?>
                        </td>
                    </tr>
                </table>
                
                <div style="width:660px;height:30px;">
                    <img src="/wp-content/themes/SunMaxxSolar/images/orangebar-solarsystemdetails.jpg" />
                </div>
                <table width="100%" cellpadding="0" cellspacing="0" border="0" style="border:#e77d1d 1px solid;">
                	<tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Solar Thermal System Type</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPSystemType'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Installation Date</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPDate'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Energy Production</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPEnergyProduction'); ?> MMBTU/Year</td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Anticipated Solar Fraction</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPSolarFraction'); ?>%</td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Type Of Solar Collectors</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPCollectorType'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Solar Collector Model</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPCollectorModel'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Quantity Of Solar Collectors</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPCollectorQty'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Gross Area Of Collectors (ft2)</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	<?php if(get_post_meta($post->ID, 'RPCollectorGrossArea', true)) { ?>
								<?php meta('RPCollectorGrossArea'); ?> ft2
							<?php } else { ?>
								<?php print($grossarea); ?> ft2
							<?php } ?>
                        </td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Net Aperture Area Of Collectors (ft2)</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	<?php if(get_post_meta($post->ID, 'RPCollectorApertureArea', true)) { ?>
								<?php meta('RPCollectorApertureArea'); ?> ft2
							<?php } else { ?>
								<?php print($netaperture); ?> ft2
							<?php } ?>
                        </td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Type Of Mounting System</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPMountingType'); ?></td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Storage Tank Capacity (G)</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;"><?php meta('RPTankCapacity'); ?> G</td>
                    </tr>
                </table>
                
                <div style="width:660px;height:30px;">
                    <img src="/wp-content/themes/SunMaxxSolar/images/orangebar-financialdetails.jpg" />
                </div>
                <table width="100%" cellpadding="0" cellspacing="0" border="0" style="border:#e77d1d 1px solid;">
                	<tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Proposed System Budget</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	<?php if ( get_post_meta($post->ID, 'RPBudget', true) ) { ?>
                	<?php
                    	$budget = get_post_meta($post->ID, 'RPBudget', true);
						$budgetfix = number_format($budget);
					?>
					$ <?php echo $budgetfix ; ?>
            	<?php } else { ?>
					Unknown
				<?php } ?>
                        </td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Solar Materials Cost</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">$ <?php echo $materialsfix ; ?> (50%)</td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Installation Cost</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">$ <?php echo $laborfix ; ?> (40%)</td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Engineering Services Cost</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">$ <?php echo $engineeringfix ; ?> (10%)</td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Additional Costs</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	<?php if ( get_post_meta($post->ID, 'RPOtherCosts', true) ) { ?>
								$ <?php meta('RPOtherCosts'); ?>
							<?php } else { ?>
								Unknown
							<?php } ?>
                        </td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Anticipated 15 Year Energy Savings</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	<?php if(get_post_meta($post->ID, 'RP15YearSavings', true)) { ?>
								$ <?php meta('RP15YearSavings'); ?> ft2
							<?php } else { ?>
								$ <?php echo $echosavings ; ?>
							<?php } ?>
                        </td>
                    </tr>
                    <tr>
                    	<td style="padding-left:10px;height:26px;line-height:26px;font-weight:bold;">Federal Rebates &amp; Credits</td>
                        <td style="text-align:right;padding-right:10px;height:26px;line-height:26px;">
                        	$ <?php
								$federalcredit = $budget * 0.3;
								$federalcreditfix = number_format($federalcredit);
								echo $federalcreditfix ;
							?> (30%)
                        </td>
                    </tr>
                </table>

		</div><!-- #content -->
        <?php include 'single-reference-project-print-sidebar.php' ; ?>
        
	</div><!-- #container -->

<?php // include 'single-reference' ; ?>
<?php include 'single-reference-project-print-footer.php' ; ?>